import { Router } from 'express';
import { verifyToken } from '../../middleware/auth';
import {

  
  // 风景接口
  getSceneryList,
  getSceneryDetail,
  createScenery,
  updateScenery,
  deleteScenery,
  
  // 活动接口
  getActivityList,
  getActivityDetail,
  createActivity,
  updateActivity,
  deleteActivity,
  
  // 前台接口
  getContentsByCategory
} from './controller';

const router = Router();


// 风景管理路由，需要验证token
router.use('/scenery', verifyToken);
router.get('/scenery', getSceneryList);
router.get('/scenery/:id', getSceneryDetail);
router.post('/scenery', createScenery);
router.put('/scenery/:id', updateScenery);
router.delete('/scenery/:id', deleteScenery);

// 活动管理路由，需要验证token
router.use('/activity', verifyToken);
router.get('/activity', getActivityList);
router.get('/activity/:id', getActivityDetail);
router.post('/activity', createActivity);
router.put('/activity/:id', updateActivity);
router.delete('/activity/:id', deleteActivity);

// 前台路由，不需要验证token
router.get('/category/:category', getContentsByCategory);

export default router; 